<h4>Manage Fields for Educational Background <br>
		<span style="font-size:12px;">( Check the checkbox to indicate the field to be shown upon candidate viewing.)</span>
	</h4>
	<!--row starts-->
	<div class="row1">
		<div class="form-group col-sm-12">
			<div class="table-responsive add_fields">
				<table cellpadding="0" cellspacing="0" border="0" class="table">
					<?php if(isset($application_education_pg[0]['master_application_form_label'])){ ?>
					<tr>
						<td colspan="2">
							<label for="<?php echo $application_education_pg[0]['master_application_form_name']; ?>" class="form_text">A.<?php echo $application_education_pg[0]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_pg[0]['master_application_form_name']; ?>" name="<?php echo $application_education_pg[0]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field39']) && $post_value['ap_field39'] == $application_education_pg[0]['master_application_form_label']) { echo 'checked';} elseif(isset($educational_field_data['label']) && in_array($application_education_pg[0]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_pg[0]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_pg[0]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_pg[0]['master_application_form_name']; ?>_id" value="<?php echo $application_education_pg[0]['master_application_id']; ?>">
						</td>
					</tr>
					<tr>
						<td>
							<label for="<?php echo $application_education_pg[1]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_pg[1]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_pg[1]['master_application_form_name']; ?>" name="<?php echo $application_education_pg[1]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field40']) && $post_value['ap_field40'] == $application_education_pg[1]['master_application_form_label']) { echo 'checked';} elseif(isset($educational_field_data['label']) && in_array($application_education_pg[1]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_pg[1]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_pg[1]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_pg[1]['master_application_form_name']; ?>_id" value="<?php echo $application_education_pg[1]['master_application_id']; ?>">
						</td>
						<td>
							<label for="<?php echo $application_education_pg[2]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_pg[2]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_pg[2]['master_application_form_name']; ?>" name="<?php echo $application_education_pg[2]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field41']) && $post_value['ap_field41'] == $application_education_pg[2]['master_application_form_label']) { echo 'checked';}  elseif(isset($educational_field_data['label']) && in_array($application_education_pg[2]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_pg[2]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_pg[2]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_pg[2]['master_application_form_name']; ?>_id" value="<?php echo $application_education_pg[2]['master_application_id']; ?>">
						</td>
					</tr>
					<?php }?>
					
					<?php if(isset($application_education_phd[0]['master_application_form_label'])){ ?>
					<tr>
						<td colspan="2">
							<label for="<?php echo $application_education_phd[0]['master_application_form_name']; ?>" class="form_text">C.<?php echo $application_education_phd[0]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_phd[0]['master_application_form_name']; ?>" name="<?php echo $application_education_phd[0]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field42']) && $post_value['ap_field42'] == $application_education_phd[0]['master_application_form_label']) { echo 'checked';} elseif(isset($educational_field_data['label']) && in_array($application_education_phd[0]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_phd[0]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_phd[0]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_phd[0]['master_application_form_name']; ?>_id" value="<?php echo $application_education_phd[0]['master_application_id']; ?>">
						</td>
					</tr>
					<tr>
						<td>
							<label for="<?php echo $application_education_phd[1]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_phd[1]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_phd[1]['master_application_form_name']; ?>" name="<?php echo $application_education_phd[1]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field43']) && $post_value['ap_field43'] == $application_education_phd[1]['master_application_form_label']) { echo 'checked';}elseif(isset($educational_field_data['label']) && in_array($application_education_phd[1]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_phd[1]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_phd[1]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_phd[1]['master_application_form_name']; ?>_id" value="<?php echo $application_education_phd[1]['master_application_id']; ?>">
						</td>
						<td>
							<label for="<?php echo $application_education_phd[2]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_phd[2]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_phd[2]['master_application_form_name']; ?>" name="<?php echo $application_education_phd[2]['master_application_form_name']; ?>" name="<?php echo $application_education_phd[2]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field44']) && $post_value['ap_field44'] == $application_education_phd[2]['master_application_form_label']) { echo 'checked';}elseif(isset($educational_field_data['label']) && in_array($application_education_phd[2]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_phd[2]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_phd[2]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_phd[2]['master_application_form_name']; ?>_id" value="<?php echo $application_education_phd[2]['master_application_id']; ?>">
						</td>
					</tr>
					<tr>
						<td>
							<label for="<?php echo $application_education_phd[3]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_phd[3]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_phd[3]['master_application_form_name']; ?>" name="<?php echo $application_education_phd[3]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field45']) && $post_value['ap_field45'] == $application_education_phd[3]['master_application_form_label']) { echo 'checked';} elseif(isset($educational_field_data['label']) && in_array($application_education_phd[3]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_phd[3]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_phd[3]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_phd[3]['master_application_form_name']; ?>_id" value="<?php echo $application_education_phd[3]['master_application_id']; ?>">
						</td>
						<td>
							<label for="<?php echo $application_education_phd[4]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_phd[4]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_phd[4]['master_application_form_name']; ?>" name="<?php echo $application_education_phd[4]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field46']) && $post_value['ap_field46'] == $application_education_phd[4]['master_application_form_label']) { echo 'checked';}elseif(isset($educational_field_data['label']) && in_array($application_education_phd[4]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_phd[4]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_phd[4]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_phd[4]['master_application_form_name']; ?>_id" value="<?php echo $application_education_phd[4]['master_application_id']; ?>">
						</td>
					</tr>
					<?php }?>
					
					<?php if(isset($application_education_master[0]['master_application_form_label'])){ ?>
					<tr>
						<td colspan="2">
							<label for="<?php echo $application_education_master[0]['master_application_form_name']; ?>" class="form_text">B.<?php echo $application_education_master[0]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_master[0]['master_application_form_name']; ?>" name="<?php echo $application_education_master[0]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field47']) && $post_value['ap_field47'] == $application_education_master[0]['master_application_form_label']) { echo 'checked';}elseif(isset($educational_field_data['label']) && in_array($application_education_master[0]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_master[0]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_master[0]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_master[0]['master_application_form_name']; ?>_id" value="<?php echo $application_education_master[0]['master_application_id']; ?>">
						</td>
					</tr>
					<tr>
						<td>
							<label for="<?php echo $application_education_master[1]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_master[1]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_master[1]['master_application_form_name']; ?>" name="<?php echo $application_education_master[1]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field48']) && $post_value['ap_field48'] == $application_education_master[1]['master_application_form_label']) { echo 'checked';}elseif(isset($educational_field_data['label']) && in_array($application_education_master[1]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_master[1]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_master[1]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_master[1]['master_application_form_name']; ?>_id" value="<?php echo $application_education_master[1]['master_application_id']; ?>">
						</td>
						<td>
							<label for="<?php echo $application_education_master[2]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_master[2]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_master[2]['master_application_form_name']; ?>" name="<?php echo $application_education_master[2]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field49']) && $post_value['ap_field49'] == $application_education_master[2]['master_application_form_label']) { echo 'checked';} elseif(isset($educational_field_data['label']) && in_array($application_education_master[2]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; }?> value="<?php echo $application_education_master[2]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_master[2]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_master[2]['master_application_form_name']; ?>_id" value="<?php echo $application_education_master[2]['master_application_id']; ?>">
						</td>
					</tr>
					<tr>
						<td>
							<label for="<?php echo $application_education_master[3]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_master[3]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_master[3]['master_application_form_name']; ?>" name="<?php echo $application_education_master[3]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field50']) && $post_value['ap_field50'] == $application_education_master[3]['master_application_form_label']) { echo 'checked';} elseif(isset($educational_field_data['label']) && in_array($application_education_master[3]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; }?> value="<?php echo $application_education_master[3]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_master[3]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_master[3]['master_application_form_name']; ?>_id" value="<?php echo $application_education_master[3]['master_application_id']; ?>">
						</td>
						<td>
							<label for="<?php echo $application_education_master[4]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_master[4]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_master[4]['master_application_form_name']; ?>" name="<?php echo $application_education_master[4]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field51']) && $post_value['ap_field51'] == $application_education_master[4]['master_application_form_label']) { echo 'checked';}elseif(isset($educational_field_data['label']) && in_array($application_education_master[4]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_master[4]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_master[4]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_master[4]['master_application_form_name']; ?>_id" value="<?php echo $application_education_master[4]['master_application_id']; ?>">
						</td>
					</tr>
					<tr>
						<td>
							<label for="<?php echo $application_education_master[5]['master_application_form_name']; ?>" class="form_text"><?php echo $application_education_master[5]['master_application_form_label'];?></label>
							<input id="<?php echo $application_education_master[5]['master_application_form_name']; ?>" name="<?php echo $application_education_master[5]['master_application_form_name']; ?>" type="checkbox" <?php if (isset($post_value['ap_field51']) && $post_value['ap_field51'] == $application_education_master[5]['master_application_form_label']) { echo 'checked';}elseif(isset($educational_field_data['label']) && in_array($application_education_master[5]['master_application_form_label'],$educational_field_data['label'])){ echo 'checked'; } ?> value="<?php echo $application_education_master[5]['master_application_form_label']; ?>" />
							<label for="<?php echo $application_education_master[5]['master_application_form_name']; ?>" class="label_text">Check to show this field.</label>
							<input type="hidden" name="<?php echo $application_education_master[5]['master_application_form_name']; ?>_id" value="<?php echo $application_education_master[5]['master_application_id']; ?>">
						</td>
						<td>
						</td>
					</tr>
					<?php }?>
				</table>
				
				<h5 class="main_heading">Extra Fields (Please use Field 1-5 for Text answering Mode, the rest will be AREA TEXT)</h5>
				<table cellpadding="0" cellspacing="0" border="0" class="table">
					<?php if(isset($application_education_extra) && !empty($application_education_extra)){
						foreach($application_education_extra as $key => $temp){
							$val = $temp['master_application_form_name'].'_text';
							$val1 = $temp['master_application_form_name'].'_1';
					 ?>		
					<tr>
						<td>
							<label for="<?php echo $temp['master_application_form_name']; ?>" class="form_text"><?php echo substr($temp['master_application_form_label'], 3); ?> :</label>
							<input id="<?php echo $temp['master_application_form_name']; ?>" name="<?php echo $temp['master_application_form_name']; ?>_text" type="text" value="<?php if(isset($post_value[$val])){ echo $post_value[$val];} else if(isset($educational_field_data['field_id']) && in_array($temp['master_application_id'],$educational_field_data['field_id'])){ echo $educational_field_data['label'][$temp['master_application_id']]; }?>" />
							<input type="hidden" name="<?php echo $temp['master_application_form_name']; ?>_id" value="<?php echo $temp['master_application_id']; ?>">
						</td>
						<td>
							<input id="<?php echo $temp['master_application_form_name']; ?>" name="<?php echo $temp['master_application_form_name']; ?>" type="checkbox" <?php if(isset($post_value[$temp['master_application_form_name']])){ echo 'checked';}elseif(isset($educational_field_data['field_id']) && in_array($temp['master_application_id'],$educational_field_data['field_id'])){ echo 'checked'; }?> value="<?php echo $temp['master_application_form_label']; ?>" />
							<label for="<?php echo $temp['master_application_form_name']; ?>">Show text field</label>
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input id="<?php echo $temp['master_application_form_name']; ?>1" name="<?php echo $temp['master_application_form_name']; ?>_1" type="checkbox" <?php if(isset($post_value[$val1])){ echo 'checked';} elseif(isset($educational_field_data['mandatory'][$temp['master_application_id']]) && $educational_field_data['mandatory'][$temp['master_application_id']]=='Yes'){ echo 'checked';  }?> value="<?php echo $temp['master_application_form_label']; ?>" />
							<label for="<?php echo $temp['master_application_form_name']; ?>1" class="label_text">Mandatory</label>
						</td>
					</tr>
					<?php }} ?>
				</table>
			</div>
		</div>
		<div class="clearfix"></div>
	</div>
	<!--row closed-->